package com.gdcp.mapper;

import com.gdcp.beans.Cart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 杨华京
 * @version 1.0
 * @description
 * @since 1.8
 */
@Repository
public interface CartMapper {

    int add(Cart cartItem);

    Cart getOne(@Param("user_id") Integer uid, @Param("product_id") Integer pid);

    int update(Cart cartItem);

    List<Cart> queryByUid(@Param("user_id") Integer uid);

    int deleteCartById(@Param("id") Integer id);

    List<Cart> queryById(@Param("id") Integer id);
}
